package com.hisense.ovcloud.spark.sql;

import com.mybatisflex.core.query.QueryWrapper;
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Primary;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableAsync
@EnableEncryptableProperties
@EnableTransactionManagement
@ComponentScan(basePackages = {"com.hisense.ovcloud.*", "com.hisense.ovcloud.commons.configs.*", "com.hisense.ovcloud.spark.sql.*"})
@MapperScan("com.hisense.ovcloud.spark.sql.mapper")
public class Main {

    public static void main(String[] args) {
        SpringApplication.run(Main.class, args);
    }

    @Bean
    @Primary
    public QueryWrapper queryWrapper(){
        return QueryWrapper.create();
    }
}
